import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
testCase="DBshop015_添加属性组流程"
webdriver=openBrowser(url)
webdriver.get(urlAdmin)
DBshopLoginAdmin(webdriver)
# 商品管理管理分类前台侧边设置编辑
DBshopEnterMenu3(webdriver,'商品管理','商品属性','属性分组')
webdriver.find_element_by_partial_link_text("添加属性组").click()
webdriver.find_element_by_id("attribute_group_name").send_keys("好好学习")
webdriver.find_element_by_id("attribute_group_sort").clear()
webdriver.find_element_by_id("attribute_group_sort").send_keys('1')
webdriver.find_element_by_xpath("//button").click()

try:
    webdriver.find_element_by_partial_link_text("编辑")
    writeLog("%s 测试通过"%testCase)
except:
    writeLog("%s 测试失败" % testCase)
    getPhoto(webdriver)
webdriver.quit()